<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="jakarta.tags.core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <base href="${ctx}/">
    <title>Title</title>
    <link rel="stylesheet" href="assets/modules/student/css/list.css">
    <link rel="stylesheet" href="assets/lib/layui/css/layui.css">
    <script src="assets/lib/layui/layui.js"></script>

    <script src="assets/lib/jquery/jquery-3.4.1.js"></script>
    <script>
        const ctx = "${ctx}";
        let currentPage=1; //当前页数
        let pages=0; //总页数
        let totalAll=0;
        let params={
            "cardId":'',
            "name":'',
            "sex":'',
            "phone":'',
            "birthStart":'',
            "birthEnd":''
        }


    </script>
    <script src="assets/modules/student/js/list.js"></script>
</head>
<body>
    <div class="search">
        <form action="" id="search-form">
            <div>
                <label for="cardId">学号:</label>
                <input id="cardId" type="text" name="cardId" >
            </div>
            <div>
                <label for="name">姓名:</label>
                <input id="name" type="text" name="name" >
            </div>
            <div>
                <label for="sex">性别:</label>
                <select id="sex" name="sex">
                    <option value="">请选择</option>
                    <option value="男">男</option>
                    <option value="女">女</option>
                </select>
            </div>
            <div class="layui-form-item">
                <label>出生日期：</label>
                <div class="layui-inline" id="range_date">
                    <div class="layui-input-inline">
                        <input type="text" autocomplete="off" id="laydate-start-date" class="layui-input"
                               placeholder="开始日期">
                    </div>
                    <div class="layui-form-mid">-</div>
                    <div class="layui-input-inline">
                        <input type="text" autocomplete="off" id="laydate-end-date" class="layui-input"
                               placeholder="结束日期">
                    </div>
                </div>
            </div>
            <div>
                <label for="phone">手机号:</label>
                <input id="phone" type="text" name="phone" >
            </div>
        </form>
    </div>
<%--    按钮区  --%>
    <div class="action">
        <button type="button" id="add">新增</button>
        <button type="button" id="edit">修改</button>
        <button type="button" id="search">查询</button>
        <button type="button" id="reset">重置</button>
        <button type="button" id="del">删除</button>
    </div>

<table id="tbl">
    <thead>
    <tr>
<%--        加个复选框--%>
        <th>
            <input type="checkbox" id="check-all">
        </th>
        <th>ID</th>
        <th>学号</th>
        <th>姓名</th>
        <th>拼音</th>
        <th>性别</th>
        <th>出生日期</th>
        <th>手机号</th>
        <th>微信号</th>
        <th>邮箱</th>
        <th>QQ</th>

    </tr>
    </thead>
    <tbody>
    <c:forEach items="${studentList}" var="s">
        <tr>
            <td>${s.id}</td>
            <td>${s.cardId}</td>
            <td>${s.name}</td>
            <td>${s.pinyin}</td>
            <td>${s.sex}</td>
            <td>${s.birthday}</td>
            <td>${s.phone}</td>
            <td>${s.weixin}</td>
            <td>${s.email}</td>
            <td>${s.qq}</td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="paginate">
    <ul>
        <li class="first"><a href="#">首页</a></li>
        <li class="prev"><a href="#">上一页</a></li>
        <li class="next"><a href="#">下一页</a></li>
        <li class="last"><a href="#">尾页</a></li>
    </ul>
</div>


    <div id="page-info-one">
        <span id="page-info">
    一共查询到<span id="total-all">0</span>条数据，一共<span id="total-pages">0</span>页
    </span>
    </div>


</body>
</html>
